package cn.iocoder.yudao.framework.server.websocket.event;

import cn.iocoder.yudao.framework.handlermapping.WsSessionContext;
import cn.iocoder.yudao.framework.server.websocket.security.WebSocketUser;
import io.netty.handler.codec.http.HttpHeaders;
import org.springframework.context.ApplicationEvent;

/**
 * @author 王广帅
 * @version 1.0.0
 * @since 2024/9/8 11:23
 */

public class WebSocketAuthSuccessEvent extends ApplicationEvent {
    private final HttpHeaders headers;
    private WsSessionContext context;
    private WebSocketUser webSocketUser;

    public WebSocketAuthSuccessEvent(Object source, HttpHeaders headers) {
        super(source);
        this.headers = headers;
    }

    public WsSessionContext getContext() {
        return context;
    }

    public void setContext(WsSessionContext context) {
        this.context = context;
    }

    public WebSocketUser getWebSocketUser() {
        return webSocketUser;
    }

    public void setWebSocketUser(WebSocketUser webSocketUser) {
        this.webSocketUser = webSocketUser;
    }

    public HttpHeaders getHeaders() {
        return headers;
    }
}
